package com.ytf.test.eighth;

/**
 * @author: YTF
 * @date: 2025/1/24 16:29
 * @version: 1.0
 * @description:
 */
class StaticSuper{
    public static String staticGet(){
        return "static StaticSuper.staticGet() ";
    }
    public String polymorphism(){
        return "StaticSuper.polymorphism()";
    }
}
class StaticSub extends StaticSuper{

    public static String staticGet(){
        return "static StaticSub.staticGet() ";
    }

    @Override
    public String polymorphism() {
        return "StaticSub.polymorphism()";
    }
}
public class StaticPolymorphism {
    public static void main(String[] args) {
        StaticSuper staticSuper = new StaticSub();
        System.out.println(staticSuper.staticGet());
        System.out.println(staticSuper.polymorphism());

        StaticSub staticSub = new StaticSub();
        System.out.println(staticSub.staticGet());
        System.out.println(staticSub.polymorphism());
    }
}
